// pages/wh_promote/promote.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    headPaddingTop: wx.getMenuButtonBoundingClientRect().top - 5,
    CZBKArr: [
      {imgUrl: '/images/good1.png', text: '人工智能电视寸', price: '1888'},
      {imgUrl: '/images/good2.png', text: '人工智能电视寸', price: '1888'},
      {imgUrl: '/images/good3.png', text: '人工智能电视寸', price: '1888'}
    ],
    scrollerHeight: 300,
    XSMSArr: [
      {imgUrl: '/images/good1.png', text: '法国原瓶进口红酒整箱', price: 188, delPrice: 799},
      {imgUrl: '/images/good2.png', text: '法国原瓶进口红酒整箱', price: 188, delPrice: 799},
      {imgUrl: '/images/good3.png', text: '法国原瓶进口红酒整箱', price: 188, delPrice: 799},
    ],
    GDHWActive: '精选优品',
    goodsList: [
      {imgUrl: '/images/good4.png', title: '人工智能电视小米电视4C32英寸', price: 699, delPrice: 799},
      {imgUrl: '/images/good5.png', title: '米家风冷对开门冰箱483L', price: 2099, delPrice: 2499},
      {imgUrl: '/images/good6.png', title: '工程挖掘机', price: 699, delPrice: 799},
      {imgUrl: '/images/good7.png', title: '米家飞天猪足金吊坠', price: 2099, delPrice: 2499},
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this
    wx.getSystemInfo({
      success (res) {
        let clientHeight = res.windowHeight;
        let clientWidth = res.windowWidth;
        let ratio = 750 / clientWidth;
        // 微信视口高度
        let rpxHeight = clientHeight * ratio
        that.setData({
          scrollerHeight: rpxHeight - 180
        })
      }
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})